@extends('layouts.admin.application')

@section('css')
    <link rel="stylesheet" href="/vendor/daterangepicker/daterangepicker.css">
    <link rel="stylesheet" href="/vendor/webupload/dist/webuploader.css" />
    <link rel="stylesheet" type="text/css" href="/vendor/webupload/style.css"/>
@endsection

@section('content')
    <div class="admin-content">
        <div class="admin-content-body">
            <div class="am-cf am-padding am-padding-bottom-0">
                <div class="am-fl am-cf">
                    <strong class="am-text-primary am-text-lg">新增教练</strong> /
                    <small>Create</small>
                </div>
            </div>

            <hr>


            @include('admin._flash')
            <div class="am-tabs am-margin">

                <form class="am-form" action="/admin/fixfxs" method="post">

                    {{csrf_field()}}

                    <div class="am-tabs am-margin" data-am-tabs>
                        <ul class="am-tabs-nav am-nav am-nav-tabs">
                            <li class="am-active"><a href="#tab1">通用信息</a></li>

                            <li><a href="#tab3">作品相册</a></li>
                        </ul>

                        <div class="am-tabs-bd">
                            <div class="am-tab-panel am-fade am-in am-active" id="tab1">

                                <div class="am-g am-margin-top">
                                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                        所属门店
                                    </div>
                                    <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                                        <select  data-am-selected="{btnWidth: '100%',  btnStyle: 'secondary', btnSize: 'sm', maxHeight: 360, searchBox: 1}"
                                                 name="store_id">
                                            <option value="">请选择</option>
                                            @foreach($cates as $c)
                                                <option value="{{$c->id}}"@if($c->id==old('store_id')) selected @endif>{{$c->name}}</option>
                                            @endforeach
                                        </select>
                                    </div>
                                </div>
                                <div class="am-g am-margin-top">
                                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                        姓名
                                    </div>
                                    <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                                        <input type="text" class="am-input-sm" name="name" value="{{ old('name') }}" placeholder="请输入姓名">
                                    </div>
                                </div>
                                <div class="am-g am-margin-top">
                                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                        编号
                                    </div>
                                    <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                                        <input type="text" class="am-input-sm" name="number" value="{{ old('number') }}" placeholder="请输入编号">
                                    </div>
                                </div>
                                <div class="am-g am-margin-top">
                                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                        个性签名
                                    </div>
                                    <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                                        <input type="text" class="am-input-sm" name="sign"  value='{{ old('sign') }}' placeholder="请不要大于30个字">
                                    </div>
                                </div>
                                <div class="am-g am-margin-top sort">
                                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                        描述信息A
                                    </div>
                                    <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                                        <textarea rows="1" name="abouta"  value="" placeholder="请不要大于15字">{{ old('abouta') }}</textarea>
                                    </div>
                                </div>
                                <div class="am-g am-margin-top sort">
                                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                        描述信息B
                                    </div>
                                    <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                                        <textarea rows="1" name="aboutb"  value="" placeholder="请不要大于15字">{{ old('aboutb') }}</textarea>
                                    </div>
                                </div>
                                <div class="am-g am-margin-top sort">
                                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                        描述信息C
                                    </div>
                                    <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                                        <textarea rows="1" name="aboutc"  value="" placeholder="请不要大于15字">{{ old('aboutc') }}</textarea>
                                    </div>
                                </div>
                                <div class="am-g am-margin-top sort">
                                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                        描述信息D
                                    </div>
                                    <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                                        <textarea rows="1" name="aboutd"  value="" placeholder="请不要大于15字">{{ old('aboutd') }}</textarea>
                                    </div>
                                </div>
                                <div class="am-g am-margin-top">
                                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                        电话
                                    </div>
                                    <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                                        <input type="text" class="am-input-sm" name="tel" value="{{ old('tel') }}" placeholder="请输入电话">
                                    </div>
                                </div>
                                {{--<div class="am-g am-margin-top">--}}
                                    {{--<div class="am-u-sm-4 am-u-md-2 am-text-right">--}}
                                        {{--销售金额--}}
                                    {{--</div>--}}
                                    {{--<div class="am-u-sm-8 am-u-md-4 am-u-end col-end">--}}
                                        {{--<input type="text" class="am-input-sm" name="sale"  placeholder="不填写为0">--}}
                                    {{--</div>--}}
                                {{--</div>--}}



                                <div class="am-g am-margin-top">
                                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                        标签
                                    </div>
                                    <div class="am-u-sm-8 am-u-md-4 am-u-end col-end">
                                        <th>@foreach($tags as $t)
                                                <label class="am-btn am-btn-default am-btn-xs am-round" >
                                                    <input type="checkbox" name="tag[]" value="{{$t->id}}" > {{$t->name}}
                                                </label>
                                        @endforeach
                                        </th>
                                    </div>
                                </div>



                                <div class="am-g am-margin-top">
                                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                        教练照片
                                    </div>

                                    <div class="am-u-sm-8 am-u-md-8 am-u-end col-end">
                                        <div class="am-form-group am-form-file new_thumb">
                                            <button type="button" class="am-btn am-btn-success am-btn-sm">
                                                <i class="am-icon-cloud-upload" id="loading"></i> 上传新的缩略图
                                            </button>
                                            <input type="file" id="image_upload">
                                            <input type="hidden" name="image" >
                                        </div>

                                        <hr data-am-widget="divider" style="" class="am-divider am-divider-dashed"/>

                                        <div>
                                            <img src="" id="img_show" style="max-height: 200px;">
                                        </div>
                                    </div>
                                </div>






                                <div class="am-g am-margin-top sort">
                                    <div class="am-u-sm-4 am-u-md-2 am-text-right">
                                        是否参与线上
                                    </div>


                                    <span class="am-btn am-btn-default am-btn-xxs am-round">
                                        <input type="radio" name="is_use" value="1"  checked  > 是
                                    </span>
                                    <span class="am-btn am-btn-default am-btn-xxs am-round">
                                        <input type="radio" name="is_use" value="0"  >否
                                    </span>
                                </div>




                            </div>



                            <div class="am-tab-panel am-fade" id="tab3">

                                <div id="uploader">
                                    <div class="queueList">
                                        <div id="dndArea" class="placeholder">
                                            <div id="filePicker"></div>
                                            <p>或将照片拖到这里，单次最多可选300张</p>
                                        </div>
                                    </div>
                                    <div class="statusBar" style="display:none;">
                                        <div class="progress">
                                            <span class="text">0%</span>
                                            <span class="percentage"></span>
                                        </div>
                                        <div class="info"></div>
                                        <div class="btns">
                                            <div id="filePicker2"></div>
                                            <div class="uploadBtn">开始上传</div>
                                        </div>
                                    </div>

                                    <div id="imgs"></div>
                                </div>

                        </div>
                    </div>

                    <div class="am-margin">
                        <button type="submit" class="am-btn am-btn-primary am-btn-xs">提交保存</button>
                        <a href="" class="am-btn am-btn-primary am-btn-xs">返回</a>
                    </div>
                    </div>
                </form>
            </div>
        </div>

        <footer class="admin-content-footer">
            <hr>
            <p class="am-padding-left">© 2017 AllMobilize, Inc. Licensed under MIT license.</p>
        </footer>
    </div>
@endsection
@section('js')

    <script src="/vendor/html5-fileupload/jquery.html5-fileupload.js"></script>
    <script src="/js/upload.js"></script>
    <script type="text/javascript" src="/vendor/webupload/dist/webuploader.js"></script>
    <script type="text/javascript" src="/vendor/webupload/upload.js"></script>



  <script>
$(function () {
//文件上传
    //文件上传





})


  </script>
@endsection